
package com.apes.fn.crm.ReturnVisit.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import com.apes.framework.util.ApesConst;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 回访客户等级扩展表
 *
 * @author bbyford
 * @create 2020-2-5
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicUpdate
@DynamicInsert
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = VisitCustomerRoleExpand.CONST_TABLE_NAME)
public class VisitCustomerRoleExpand extends Model {
    public static final String CONST_TABLE_NAME = "fn_visit_customer_role_expand";

    @Id
    @Comment("编码")
    @Column(name = "id", nullable = false, length = 32)
    @ApesGenerator(code = "fn_visit_customer_level_expand", name = "回访客户身份扩展表")
    private String id;

    @Comment("客户身份编码")
    @Column(name = "customer_role_id", length = 32, nullable = false)
    private String customerRoleId;

    @Comment("客户身份名称")
    @Column(name = "customer_role_name", length = 36, nullable = false)
    private String customerRoleName;

    @Comment("回访标记")
    @Column(name = "visit_sign", columnDefinition = ApesConst.FIELD_BOOLEAN_FALSE)
    private boolean visitSign = false;

}


